package top.hjc.orange.user.domain.api;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import top.hjc.orange.annotation.ProjectedPayloadType;
import top.hjc.orange.user.domain.api.view.UserView;

import java.util.Optional;

/**
 * @author: huangjicheng
 * @date: 2025/10/10
 * @desc：
 */
@ProjectedPayloadType(UserView.class)
interface UserService {

    @GetMapping("/user/{id}")
    <T> Optional<T> findById(@PathVariable Long id, @ProjectedPayloadType Class<T> projectionType);

}
